Perl 5.20 doesn't like replacing stuff on an undefined value.