fix for ios6 compatibility
Merge pull request #3 from elwerene/master

Fix for pre iOS7 compatibility