fixes for linux for cocos shared libs build

Please refer to http://discuss.cocos2d-x.org/t/cmake-linux-build-with-shared-libraries-prebuilt-not-pic/16671/4 for background.