Make an out-of-source build work

Signed-off-by: Thiago Macieira <thiago@macieira.org>