maintain compatibility with qrencode pre-v3.4.0

By only setting foreground and background flags when they differ
from the defaults, we can maintain compatibility pre-v3.4.0 before
support for colored QR codes was added.