Update code to compile with Snap 1.0.