Native platform: platform build support; dynamic loader

Add support for platform build for the native platform.
Add support for dynamic loading.

Tested on Linux.
(The OSX makefile additions used to work, but I didn't test recently)