Fixed conversion from empty String to ByteVector
Use std::string::c_str() rather than &s[0] where a const pointer is required.
Avoid using &d->data[0] when d->data is empty.
Merge pull request #330 from TsudaKageyu/fix-emptystring

Fixed a bug reported at #328