[ticket/12012] Move MS SQL server comparison into a method

PHPBB3-12012