Fixed some stuff breaking compatibility with older perls.