[geometry] Applied patch of Krzysztof Czainski to conditionally avoid using boost numeric cast. Note: we will look for a more general approach later.