Makefile fixes for cross compilation