Minor fixes to work with Ubuntu 12.04