Added objectType property

This fixes a bug where when getting statements if the object of the statement is an agent, the agent has no objectType property. 

The code is copy and pasted from activity.js but Activity is replaced with Agent.