adding missing header for auto_ptr
clean detection of 32/64bits platform
clean includes to fix build