Bieber apologizes to former president for cursing him