Fix: ignore undefined identifiers in typeof (fixes #1482)