Add support for accessing static members (fixes #46)