Update Perl to 5.18.4, fix gcc 4.9 build issue