As you already rebuild autotools it would make sense to sed Makefile.am rather than Makefile.in.
fixed. Next time, for such a pedantic issue, attach a patch so it comes off less lame.