fix image upload for firefox and IE