Upgrade to lab 5.x

Fixes #476.