Check existence of charset key in options

The constructor makes use of the charkey value in the options array. When
using an error setting that turns notices into errors and when you
convert all errors into exceptions, this section of code will throw
an exception when the options array doesn't contain the charkey key.

This patch checks for the existence of the charset key and sets values
appropriately so that PHP doesn't throw an exception.