Fix build on Ubuntu 12.04

Thanks to Cristian Cadar.