Update legacy.php

For optimisation, it's necessary to store the prefix in all lower-case.