Fix some problems that the Automake migration caused.