(PUP-1954) use attr_accessor instead of attr

A one-line change that fixes a deprecation warning on certain versions
of ruby, including jruby.

Stackoverflow says this code is equivalent:

http://stackoverflow.com/questions/13958061/attr-vs-attr-accessor