fixing UNIX_TIMESTAMP() for mssql

@karlitschek @icewind1991 @bantu @VicDeo THX