St Johnstone remain in the hunt for a Europa League place after Liam Craig's strike gave them a 1-0 win at Dundee United.