Fix warnings due to unknown selectors
Improve presentViewController and dismissViewController checks

Avoid runtime penalties when build only for iOS >= 5.0. Also
fixes warnings emitted by the compiler due to deprecated method
usage.