Enable by default cocoa if OSX version > 10.7. Remove some warnings.