Mimic php's base64_decode output for invalid inputs. Fixes #49