Replaced shared_ptr with ofPtr

I couldn't get ofxStateMachine to compile on Raspberry Pi with -lib=c++11 enabled, so I made these changes accordingly. Tested across all platforms but Win, but this shouldn't be a problem anywhere.