Fixed PHP extension compilation on Windows (closes #1167)