added some functions from ../../src/swfbbox.c.