Fixed two compilation issues.

With new compilers and boost 1.5.3, since that version adds an
"explicit operator bool()" to the smart pointer classes, if
the compiler supports it.

Change-Id: I31862314479990adc8333e834dd16cbddbfcc387