Ringgit ends flat versus greenback