Added support for .dylib loading for running on OS X
(cherry picked from commit 546e7eb)
Clean up of files and moved header file to correct location