Make access control compatible between AgentX and SNMPv2

Signed-off-by: leo-ma <begeekmyfriend@gmail.com>
Merge pull request #49 from leo-ma/snmpv2_patch

Bug fix and code improvement