Merge pull request #20 from jonludlam/non-xs-build-fixes

Fixes to be able to build outside of the build system
Staging fixes for planex

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>