fix #66, support both std and boost ptr