automake: portability fixes