[feature/crypto] Fix tests on PHP versions < 5.3.7

PHPBB3-11610