Fix handling of bool return values on 64-bit devices