fixed "deprecated functions" compiler warnings, fixed "undeclared select...

...or" compiler warnings, fully compatible with XCode5 and sdk7.1