Added support for linux and macosx systems.
Linux tested.