Do not compile apple objective-c codes if using gcc

This fixes bug #3546 reported on the bug tracker