added support for cross compiling.