Mess with maxlength only if specified

It seems the previous patch was causing problems in Firefox 3.6 since it
was returning -1 for the value of the maxlength attribute if the
attribute was never supplied in the first place.

This patch tries to detect if the maxlength was supplied, and only
proceeds to manipulate it if it is present.
Merge pull request #56 from paracycle/maxlength

Mess with maxlength only if specified