As others have mentioned, constructs and such are great for outside of the library, indoors not so much. A wizard would want to have a fairly intelligent guard on the inside. The following is my idea for an interesting guard. He would be an outsider summoned to be the wizard's lab assistant and sort of manager while the wizard's away. 'Kleister' is a modified imp, one with levels in expert-he's typically not a fighting type, so much as a bookish lab assistant, or at least that's how he should appear. To make things a little more interesting, lets say this devil is naturally more physically formidable, but his true form was locked away by the wizard in an object of some sort that is located within the laboratory. The conjurer would have used this object as a sort of bargaining chip to get the devil to guard the lab-the devil has since fulfilled his service but since the wizard isn't around to give him back this object he has to stick around.
When the PCs enter the laboratory, Kleister sees an opportunity for them to find his object. After stalking them invisibly and using detect good/magic, Kleister would offer his services to the PCs, acting in a very benign role-perhaps letting them find some paltry magic items and helping them get past some traps (You could showcase some deadly magical traps the PCs would've never been able to disarm themselves normally). You can have some sort of ooze or aberration be in the way of the imp getting his item (something with DR 5/magic or more and immune to poison would do the trick-an opponent the imp wouldn't be able to defeat by himself), and one of his goals for the PCs would be getting them to slay the creature.
His first form is CR 4, which should be a pushover for a reasonably sized lvl 3 party, but his second form is CR 6 which is generally a tough encounter. However, it could make for a potentially interesting fight-since the PCs are in a wizard's lab, perhaps they have a chance and/or need to look for magic items scattered about the place that would give them an edge in the fight (potions of heroism, fire breath, a wand of magic missiles (CL 5) and 8 charges left, etc...), perhaps luring Kleister to another magical trap to be fried in. Also, if he gets the item storing his powers, perhaps make the transformation take a full round and allow PCs some potshots at him (or run!). Without further ado, some stats:
[sblock]Kleister (Imp, Expert 4 with elite array for ability scores)
HD: 3d8+4d6+14 (41 hp)
Init: +6
Speed: 20 ft., Fly 50 ft. (Perfect)
AC: 19 (+2 size, +2 Dex, +5 Natural)
Attack: Sting +10 (1d4+2 + poison)
Space/Reach: 2-1/2 ft./0 ft.
SA: Poison, spell-like abilities
SQ: Alt Form, DR 5/good or silver, darkvision 60'
fast healing 2, immunity to poison, resistance to fire 5
Saves: Fort +6, Ref +6, Will +9
Str 14 Dex 14 Con 15 Int 13 Wis 14 Cha 14
Skills: Bluff +12, Diplomacy +12, Hide +20, Knowledge (Arcana) +13, Knowledge (the Planes) +11, Listen +12, Move Silently +12, Search +11, Spellcraft +11, Spot +12
Feats: Improved Initiative, Power Attack, Skill Focus (Knowledge: Arcana)
Alignment: Lawful Evil
CR: 4
(Abilities as per normal Imp, though the poison DC is 2 higher than standard)
Kleister
Imp, Expert 4 (Added Half-fiend template, made large size for dramatic effect,
but no stat adjustments due to the size increase)
Large-sized Outsider
HD: 3d8+4d6+21 (48 hp)
Init: +8
Speed: 40 ft., Fly 30 ft. (Average)
AC: 20 (+4 Dex, +6 Natural)
Attack (PA 2): Bite +8 (1d8+6), Sting +6 (1d6+4+poison)
Space/Reach: 10 ft./5 ft.
SA: Poison, spell-like abilities
SQ: Alt Form, DR 5/good or silver, darkvision 60'
fast healing 2, immunity to poison, resistance to elements 10, SR 13
Saves: Fort +7, Ref +8, Will +9
Str 18 Dex 18 Con 17 Int 17 Wis 14 Cha 16
Skills: Bluff +13, Diplomacy +13, Hide +10, Knowledge (Arcana) +13, Listen +12, Move Silently +10, Search +11, Spellcraft +13, Spot +12
Feats: Improved Initiative, Power Attack, Multiattack
CR: 6
An imp’s natural weapons, as well as any weapons it wields, are treated as evil-aligned and lawful-aligned for the purpose of overcoming damage reduction.
Poison (Ex): Injury, Fortitude DC 16, initial damage 1d4 Dex, secondary damage 2d4 Dex. The save DC is Constitution-based and includes a +2 racial bonus.
Spell-Like Abilities: At will—detect good, detect magic, invisibility (self only); 3/day—darkness, poison (DC 15),

1/day—desecrate, suggestion (DC 15), unholy blight (DC 18). Caster level 6th. The save DC is Charisma-based.
Once per week an imp can use commune to ask six questions. The ability otherwise works as the spell (caster level 12th).
Alternate Form (Su): An imp can assume other forms at will as a standard action. This ability functions as a polymorph spell cast on itself (caster level 12th), except that an imp does not regain hit points for changing form, and an individual imp can assume only one or two forms no larger than Medium. Common forms include monstrous spider, raven, rat, and boar.[/sblock]