Inlcude <stdexcept> instead of <exception> in a few palces

This used to break gentoo compatability