Fix Mac build : Complex classes needs out of line destructors and constructors.

(cherry picked from commit 63a53132d7380a094e94b9315f9f8ade20e2940b)