Add global interperter lock, fixes #27, fixes #30