Fix MacOS build of C libraries (tested under Mavericks using MacPorts gcc 4.5).

The OSTYPE variable is not seen by the Makefile, so use the output of
`uname -s` to detect the operating system instead.