compile fails on Ubuntu 12.10 without this patch