Fixed elif/elseif error that made highgui-windows fail on mac+cocoa.

Moved from master to 2.4 after comments from Roman Donchenko.

Fix for bug that excludes cocoa from build on OSX