Added code to make this gem compatible with RubyMotion