Fixed various build / installation issues.