Replacing boost::conditional with boost::bool_.
small bugfix when calculating v plane offset.
Added missing typename specifiers.
Fixed compiler errors with gcc.