automake: Add patch for perl 5.24 compatibility