Add overloading of bit cast funcs adapted from GopherJS