Remove MEGAGLEST_VERSION for MG_VERSION_H_CONTENTS

I noticed that mk/macos/CMakeLists.txt has special code for extracting the
megaglest version , but its already done in CMakeLists.txt. This removes the
duplicate detection and changes the users of MEGAGLEST_VERSION to
MG_VERSION_H_CONTENTS.
Change library search path on MacOS

When using mac ports GL/gl.h ends up outside the cmake search paths for
libraries and includes. By adding them to mk/macos/CMakeLists.txt they are now
available and make it possible to build g3d_viewer along with the rest of
megaglest. To make this work properly I had to move the inclusion of
mk/macos/CMakeLists.txt further up the master CMakeLists.txt so merged both IF
APPLE tests in to one.

This has built successfully through xcode and gnumake.