It is the invariable past subjunctive of the verb 'be' and is employed very naturally here after 'as if' to denote an appearance that, in the speaker's view, is/was contrary to reality.
Where, on the other hand, the speaker wishes to concede at least the possibility of the appearance's corresponding to reality, the indicative is more likely to be used. Compare
Although we've never found one yet, he was talking the other day as if there really was another way to tackle this problem.
- For Teachers