I would suggest a different approach. This will work as long as the quotes are correctly balanced, because then you know you're inside a quoted string iff the number of quotes that follow is odd, thereby making the lookbehind part unnecessary:
if (preg_match(
'/WORD # Match WORD
(?! # unless it\'s possible to match the following here:
(?: # a string of characters
(?!") # that contains neither "
[^"] # nor "
)* # (any length),
("|") # followed by either " or " (remember which in \1)
(?: # Then match
(?:(?!\1).)*\1 # any string except our quote char(s), followed by that quote char(s)
(?:(?!\1).)*\1 # twice,
)* # repeated any number of times --> even number
(?:(?!\1).)* # followed only by strings that don\'t contain our quote char(s)
$ # until the end of the string
) # End of lookahead/sx',
$subject))