Makefile fixes for Ubuntu 13.04

Fixes #563