Support for version 0.9 and later

In version 0.9 the fields dict in session_stats() was moved to the
_fields dict and the stats are accessible directly as attributes of the
session object. Introduce a function to get the correct statistic
depending on the version
Move secondsActive back to a counter for now