Fix for Linux build.

1) Excluded .dylib builds for non-Darwin systems. 
2) Add missing "staticlib" dependency to "all" target.
3) Add missing <stdlib.h> include (probably Linux-specific.)
4) Fixed "... names the constructor, not the type" errors.