Small improvements to the main Makefile for cross-compilation.

While trying to compile PHP-CPP for Intel Edison I had to make small changes to the main Makefile. Committing them with the hope that they can be helpful also for other users.