Compiling in VS2012

Casting the divert layer argument for the DivertOpen function resolves
a type error in VS2012.