adjusting sample code
make tests and ShareJS example pass on iOS 5.0