Was is very common, but were is the correct choice. It is an example of the subjunctive mood used in a contrary-to-fact situation. Take a look at Why be anonymous?
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.