What did Ibn Sina receive as payment for helping the emir