Updated to_obj for compatibility with python-cybox and removed setter method usage