Ringgit ends marginally lower against US dollar