Added support for CROSS_COMPILE variable definable on the commandline as a prefix to build commands for cross compilation tool chains.
Minor updates to remove int->unsigned int narrowing conversion warnings with g++4.8.2
Updated to fix errors and warning from g++4.8.2: missing includes, changed library name, incorrect type for returned value.