MDL-25174 adding a workaround for old passwords that were hashed with magic quotes