Adapted the syntax to support both PyNN 0.7 and PyNN 0.8.