Fix install / run issues on Ubuntu

This fixes issues on Ubuntu 14.04 for myself. Sorry there's no tests but hopefully this is a help towards a solution.

See #483
Fixes #394