Check /etc/messages and on boot it will show what mode. Also the bootarg.init.boot_clustered loader variable will show which it is... Looks like you are running 7-Mode commands here though... if "aggr status" works it is 7-Mode and if "aggr show" works it is cDOT... exception being if you are in the node shell (d-blade) then the 7-Mode command works in cDOT in that shell.
I'm suprised that IBM would have changed the implementation of "version".
There are lot of possible "emperical" methods to do this i.e. testing for the presence or absence of a command, or parsing its output, some ideas are mentioned above ...
But another way would be to ask the Filer via a different interface. For example:
Via the netapp manageability sdk it should be possible to do something like this:
perl ./apitest.pl target_filer username password 'system-get-version'
<version>NetApp Release 7.3.6P4: Fri Nov 18 01:15:52 PST 2011</version>
Or via a command line SNMP query:
snmpgetnext -v1 -c community_string -m NETAPP-MIB target_filer productVersion
NETAPP-MIB::productVersion.0 = STRING: NetApp Release 8.1.2P3 7-Mode: Wed Feb 20 19:56:22 PST 2013
Hope this helps.