Use getters for namespace attribute access for MW 1.20 compatility.

The attributes are now protected so can't be indexed directly anymore.
This should still be bw compatible with 1.16.
Merge pull request #7 from thijskh/master

Use getters for namespace attribute access for MW 1.20 compatility.