Fix build problems on Ubuntu

Fixes issue #237.