Ringgit ends higher versus greenback