moved global 'starttime' var (python 2.7)

Minor edit enables the script to run on python 2.7