Make ajax capturing configurable.

Should fix #14